function huoqu() {
	var n = document.getElementById("num").value

	function getJC(n) {


		if (n == 1) {
			return 1;
		}
		return n * getJC(n - 1);
	}

	var sum = 0;
	for (var i = 1; i <= n; i++) {
		sum += getJC(i);

	}
	var a=console.log(sum);
	document.getElementById('jg').value=a
}
